﻿using System.Collections.Generic;
using System.Xml.Serialization;

namespace MobySharp.Results
{
    [XmlRoot("mobypicture")]
    public class FriendsResult : BaseResult, IResult
    {
        public FriendsResult()
        {
            Friends = new List<Friend>();
        }

        [XmlArray("friends"), XmlArrayItem(ElementName = "friend")]
        public List<Friend> Friends { get; set; }

        #region Nested type: Friend

        public class Friend
        {
            [XmlElement(ElementName = "username")]
            public string Username { get; set; }

            [XmlElement(ElementName = "firstname")]
            public string Firstname { get; set; }

            [XmlElement(ElementName = "lastname")]
            public string Lastname { get; set; }

            [XmlElement(ElementName = "url_avatar")]
            public string AvatarURL { get; set; }

            [XmlElement(ElementName = "url_avatar_small")]
            public string AvatarURLSmall { get; set; }
        }

        #endregion
    }
}